title: Inner join with only one of two conditions
body: <p>I have two tables:</p>
  
  <p><strong>1 - categories</strong></p>
  
  <pre><code>+--------+----------+
  | id     | main_lang| 
  +--------+----------+
  |    1   |     ar   | 
  |    2   |     en   | 
  |    3   |     en   | 
  +--------+----------+
  </code></pre>
  
  <p><strong>2 - categories_data</strong></p>
  
  <pre><code>+--------+----------+-----------+--------
  | data_id|     lang  |  cat_id |  title
  +--------+----------+-------------------
  |    1   |     ar   |   1      | عنوان 1
  |    2   |     en   |   1      | title 1
  |    3   |     en   |   2      | title 2
  |    4   |     en   |   3      | title 3
  +--------+----------+-------------------
  </code></pre>
  
  <p>now , I want to list all categories , joined on <code>categories_data</code>.lang = ar , if that join return null, then join on <code>categories_data</code>.<code>lang</code>=<code>categories</code>.<code>main_lang</code>.</p>