OR is not supported with CASE Statement in SQL Server OR is not supported with CASE Statement in SQL Server sql sql

OR is not supported with CASE Statement in SQL Server


That format requires you to use either:

CASE ebv.db_no   WHEN 22978 THEN 'WECS 9500'   WHEN 23218 THEN 'WECS 9500'    WHEN 23219 THEN 'WECS 9500'   ELSE 'WECS 9520' END as wecs_system 

Otherwise, use:

CASE    WHEN ebv.db_no IN (22978, 23218, 23219) THEN 'WECS 9500'   ELSE 'WECS 9520' END as wecs_system 


CASE  WHEN ebv.db_no = 22978 OR        ebv.db_no = 23218 OR       ebv.db_no = 23219  THEN 'WECS 9500'   ELSE 'WECS 9520' END as wecs_system 


CASE WHEN ebv.db_no IN (22978, 23218, 23219) THEN 'WECS 9500'  ELSE 'WECS 9520' END as wecs_system