I have the following sql query:
SELECT id, first_name, last_name FROM users;
Now I want to add a case statement with the following clauses:
1. If 1+1 == 2 then show only id column
2. If 1+2 == 2 then show only first_name column
3. If 1+3 == 3 then show only last_name column
This is only stupid example but should describe what I'm looking for. Is there a way to do this in PostgreSQL?
CASE?