SELECT * FROM TBLABC WHERE ID = 12 AND ((to_user_id =4 AND user_id = 1) OR (to_user_id =1 AND user_id = 4 ))