I'm working in MySQL and would like something resembling a ternary expression in SQL, for example:
SELECT MEMBER_ID, ((MEMBER_ID = 2) ? 1 : 0) AS IS_CHOSEN
FROM MEMBER
The output would look roughly like:
MEMBER_ID | IS_CHOSEN
2 | 1
3 | 0
4 | 0
and so on.
What's the way to express that?