How to get the top row value in insert of temporary table insert into @Temp([dateTime],Reading) 
values (
@startDate,
(select top(1) @dynamicCOLUMN from tableABC where DateColumn &gt;= @startDate and DateColumn &lt; @tempdt  order by DateColumn desc))


I want the value of dynamic column instead it returns columns name in select subquery
If there are only a few possible columns, then you could do a separate check for each column name:

if (@dynamicCOLUMN = 'Column1')
begin
    insert into @Temp([dateTime],Reading) 
    values (
    @startDate,
    (select top 1 Column1 from tableABC where DateColumn &gt;= @startDate and DateColumn &lt; @tempdt  order by DateColumn desc))
end

if (@dynamicCOLUMN = 'Column2')
begin
    insert into @Temp([dateTime],Reading) 
    values (
    @startDate,
    (select top 1 Column2 from tableABC where DateColumn &gt;= @startDate and DateColumn &lt; @tempdt  order by DateColumn desc))
end


If there are a lot of possible columns, then dynamic queries as suggested by McNets may be more suitable.