I am not sure if I have missed to search properly, but I couldn't get the exact question as mine
This is something similar but not exact
DETERMINING WHICH TABLE TO JOIN TO
Actually I want to decide with which table to join based on the bases of field value
Kind of
select * from Table1
left join (case when table1.field=1 Then Table2 else Table3 end) final
on Table1.Col1 = final.Col1
Table2 and Table3 has same structure
Here is my table detail,
i had 3 tables employee_master ,employee_timing & designation_timing. now, there is one field in employee master i.e customizedtime. I want to calculate the time of employee on the bases of employee_timing & designation_timing but there is one condition while joining this table if employee_master's field customizedtime is true then i have to join with table employee_timing other wise with designation_timing