Declare @DateInput as Date
Select
Case when @DateInput between '2012-06-06'and '2013-06-10'
Then
AnniversaryStartDate
when @DateInput between '2012-06-06'and '2013-06-10'
Then
AnniversaryEndDate
Else
Null
End as AnniversaryStartDate,AnniversaryEndDate
from dbo.AnniversaryData
where DateInput = @DateInput
This resolves the issue of multiple cases, but now get an error saying Invalid Column. I do not have a columnname dateInput in my Anniversary Data table. But I want to accept a date parameter and if it falls between the start and end anniversary dates , display the details. Any advise?