SELECT ProductNumber, Category =
CASE ProductLine
WHEN 'R' or 'r' THEN 'Road'
WHEN 'M' or 'm' THEN 'Mountain'
WHEN 'T' or 't' THEN 'Touring'
WHEN 'S' or 's' THEN 'Other sale items'
ELSE 'Not for sale'
My basic requirement is to use ‘OR’ with CASE (if possible) , Please suggest if i am doing anything wrong.
A different way to write
casecomes close, but then you have to repeat the variable:Or a
likecharacter class:Note that in SQL, string comparison is case-insensitive by default. You can alter the default by setting a case-sensitive database collation, but that’s fairly unusual.