title: Mysql choose to join table where record exists
body: <p>I have 2 tables that are the same, but only in one of them a record exists and I need to choose which table to join.</p>
  
  <p>Example:</p>
  
  <p>Table <strong>catalog</strong>:</p>
  
  <pre><code>| catalog_id | catalog_name |
  </code></pre>
  
  <p>Table <strong>catalog_draft</strong>:</p>
  
  <pre><code>| catalog_id | catalog_name |
  </code></pre>
  
  <p>Table <strong>catalog_items</strong>:</p>
  
  <pre><code>| item_id | catalog_id | item_name |
  </code></pre>
  
  <p>So by this small example I need to get all items with catalog name, but catalog name could be in <strong>catalog</strong> or <strong>catalog_draft</strong> table.</p>