I have a SQL Server 2012 query that takes a parameter @Region
. There's a WHERE
clause that I want to set its value based on the @Region
value. Below is the code I was trying to use
case
when @Region = 'SW'
then Transact.busloc_id in (3, 7, 11)
else Transact.busloc_id in (1, 5, 7)
end