title: SQL: Left Join & not found linking
body: <p>Is there any chance to do a LEFT JOIN in multiple tables, and if none found -> use another column to try join on this another column?</p>
  
  <p>Like:</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `main` (
    `brand` varchar(200),
    `article` varchar(200),
    `price` float,
    PRIMARY KEY (`article`)
  );
  INSERT INTO `main` (`brand`, `article`, `price`) VALUES
    ('brand1', '001', '10'),
    ('brand2', '002', '20'),
    ('brand3', '003', '30');
  
  
  CREATE TABLE IF NOT EXISTS `dealer1` (
    `brand` varchar(200),
    `article` varchar(200),
    `articleFixed` varchar(200),
    `price` float,
    PRIMARY KEY (`article`)
  );
  INSERT INTO `dealer1` (`brand`, `article`, `articleFixed`, `price`) VALUES
    ('brand1', '01', '001', '12'),
    ('brand3', '03', '003', '28');
  
  CREATE TABLE IF NOT EXISTS `dealer2` (
    `brand` varchar(200),
    `article` varchar(200),
    `articleFixed` varchar(200),
    `price` float,
    PRIMARY KEY (`article`)
  );
  INSERT INTO `dealer2` (`brand`, `article`, `articleFixed`, `price`) VALUES
    ('brand2', '02', '002', '8'),
    ('brand3', '03', '003', '38');
  </code></pre>
  
  <p>Here I'm comparing base prices with dealers. For this I use LEFT JOIN.</p>
  
  <p>Like this:</p>
  
  <pre><code>SELECT *
  FROM `main` M
  LEFT JOIN `dealer1` D1 ON M.article = D1.article
  LEFT JOIN `dealer2` D2 ON M.article = D2.article;
  </code></pre>
  
  <p>but for sure, join won't work, as '01' != '001'</p>
  
  <p>for this purpose I have another column, called <code>articleFixed</code></p>
  
  <p>and my <strong>main question</strong> is:</p>
  
  <p>How to try re-join failed rows, based on another column (ps: I can have something around 10 tables with 100k rows in them)? Is it possible to do somehow? In production data is totally different, and first it should look by article column, only after that -> by articleFixed, if none join found. Also I can't use Like.</p>
  
  <p>As a <code>result</code> I'm expecting to get:</p>
  
  <pre><code>brand  | article | priceMain | priceDealer1 | priceDealer2
  brand1 | 001     | 10        | 12           | NULL
  brand2 | 002     | 20        | NULL         | 8
  brand3 | 003     | 30        | 28           | 38
  </code></pre>
  
  <p>Also I'm providing a fiddle: <a href="http://sqlfiddle.com/#!5/bf496/2" rel="nofollow noreferrer">http://sqlfiddle.com/#!5/bf496/2</a></p>