T-SQL SYNTAX ISSUE - using OR in CASE statement
Based on your edits, you don't even need an OR
statement:
CASE
WHEN @var1 IN ('99', '22')
THEN
(CASE @var2
WHEN 'All'
THEN col1
ELSE @var2
END)
END
DECLARE @Variable INT;
SET @Variable = 1;
SELECT
CASE
WHEN @Variable = 1 OR @Variable = 2 THEN 'It is 1 or 2'
WHEN @Variable = 3 THEN 'It is 3'
ELSE 'It is not 1, 2, or 3'
END AS [SomeField]
MSDN docs for CASE, OR, and Expressions.