I want to return specific column titles based on a certain condition from the column's values:
E.g
in the table Employees:
Expand|Select|Wrap|Line Numbers
- EmployeeID Monday Tuesday Wednesday
- 1 1 0 0
- 2 0 1 1
zero absent,
I want using the show columns to return the days that employeeID 2 is absent, so something to this effect.
Expand|Select|Wrap|Line Numbers
- show columns from Employees where EmployeeID = 2
- && Monday = 0 && Tuesday =0 && Wednesday = 0
but what would using show columns or not?
and in the query how can use a wildcard instead of having to repeat Monday , Tuesday, Wednesday?
Any help on the logic of this query would be appreciated.
Thanks.