I want to acheive the functionality like this how can i do this.
DECLARE @filterByDate VARCHAR(20)
IF(@filterByDate = 'expectedDate')
SET @filterByDate = 'ExpectedStartDate'
ELSE
SET @filterByDate = 'ActualStartDate'
SELECT @filterByDate AS Date
FROM TableName
Thanks.
1 Answer