I am trying to select data from three tables. my logic should go like this:
Basically select from either one of the two tables which is determined by a column in table A.
Select a.orderid ,
if (a.ordertable= b) then b.order_info
else
c.order_info
where
a.order_id = b.order_id or a.order_id = c.order_id
Any pointers?