The order of the values in your list is implicitly part of the problem. This order must be stored as part of the data in the source table, otherwise the problem can't be solved reliably, even in a loop. I've added an "ordinal" column to represent the missing ordering.
declare @orderedset table(ordinal int not null, value int null)
insert into @orderedset(ordinal, value) values (1, 100)
insert into @orderedset(ordinal, value) values (2, 10)
insert into @orderedset(ordinal, value) values (3, NULL)
insert into @orderedset(ordinal, value) values (4, NULL)
insert into @orderedset(ordinal, value) values (5, 22)
insert into @orderedset(ordinal, value) values (5, NULL);
WITH fillvalues AS
(
SELECT ordinal, value FROM @orderedset
WHERE value IS NOT NULL
)
SELECT
(
SELECT value FROM fillvalues
WHERE fillvalues.ordinal =
(
SELECT MAX(ordinal)
FROM fillvalues
WHERE ordinal <= unfilled.ordinal
)
) As filledvalue
FROM @orderedset unfilled