I am trying to retract a column from a table by knowing the header name of the column that I want to retrieve.
select @sName
from VPDW.dbo.Fact_Email_MW100
where VesselID = 3763
and (cast(UTClogTime as date) >= cast(DateAdd(day, -1, GETUTCDATE()) as date))
where
Declare @sName nvarchar(max);
holds the string name of the column that I want to extract from my table.