select * from tablenm WHERE(cal1 = 'true' AND CalStatu1 = 'Done' and cal1 = 'true') OR (cal1 != 'true' AND CalFinal = 'True'));
select * from TableNm where CASE WHEN cal1 = 'true' THEN CalStatu1 = 'Done' and cal1 = 'true' else CalFinal = 'True' END