Posted on February 7, 2010, 1:43 pm, by Hazan Ilan, under Cool MySQL Queries.
One way to do a “Conditional Join” in MySQL is by using a “LEFT JOIN”. Create a “LEFT JOIN” for each condition and combine the results into one column using an “IF” statement by the “SELECT” expression.