Here is my test T-SQL.
DECLARE @TestVal INT
SET @TestVal = 1
SELECT
CASE @TestVal
WHEN (1 | 2 | 6) THEN 'First' // I would like to check 1 or 2 or 6.
WHEN 3 THEN 'Second'
WHEN 4 THEN 'Third'
ELSE 'Other'
END
The current result is 'Other'.
I would like to get the result as 'First'. How can I use (OR statement) in my T-SQL.
Best regards