Select jobid As job,
CASE WHEN code in ('1','2','3') THEN code
ELSE 'Code is wrong' End AS ErrorMessage
FROM emp where job not in ('1','2','3')
when i run the above sql statement I am gettign an error
Msg 245, Level 16, State 1, Line 1
Syntax error converting the varchar value 'Code is wrong' to a column of data type int.