I have two example tables:
TABLE1:
ID | COLUMN_B| COLUMN_C
_________|_________|_________
1 | 0 | 1
________|_________|_________
2 | 0 | 1
________|_________|_________
3 | 0 | 1
TABLE2:
ID | COLUMN_E| COLUMN_F
________|_________|________
1 | Y | X
________|_________|_________
2 | Y | X
________|_________|_________
3 | Y | X
They relate to each other with the ID column. I would like to perform a select on TABLE1, bringing COLUMN_B and bringing COLUMN_C only if the value on COLUMN_E is Y.
Is it possible to create a condition that simulates something like: "select column_b, and select column_c IF AND ONLY IF the value on column_e from TABLE2 is Y for the same ID"?