यह काम करता है (SQLFiddle डेमो ):
SELECT id, num,
CASE WHEN names IN ('JACK', 'BRUCE') AND num=0
THEN 1 ELSE 0 END AS mynames
FROM mytable
यह काम करता है (SQLFiddle डेमो ):
SELECT id, num,
CASE WHEN names IN ('JACK', 'BRUCE') AND num=0
THEN 1 ELSE 0 END AS mynames
FROM mytable