title: MySQL - Ignore certain rows depending on different conditions
body: <p>As an example I have a <code>Pokemon</code> column with certain data inside, many of them repeat</p>
  
  <p>Pokemon</p>
  
  <pre><code>Wartotle
  Pichu
  Pikachu
  Pichu
  Kadabra
  Charmelon
  Squirtle
  Wartotle
  Wartotle
  Pidgeotto
  Pidgeotto
  Diglett
  </code></pre>
  
  <p>What I need is to ignore certain data, if a specific data on the same <code>column</code> doesn't exists. Specific data from the <code>pokemon</code> column must exists before I fetch data via <code>SELECT</code></p>
  
  <p>What I want is something is a query that do something like this but on multiple data</p>
  
  <pre><code>SELECT * FROM table 
  (
      If `Pichu` doesn't exists then don't `SELECT` `Pikachu`
      If `Abra` doesn't exists then don't `SELECT` `Kadabra`
      If `Squirtle` doesn't exists then don't `SELECT` `Wartotle`
      If `Pidgety` doesn't exists then don't `SELECT` `Pidgeotto`
      If `Squirtle` doesn't exists then don't `SELECT` `Wartotle`
      If `Charmander` doesn't exists then don't `SELECT` `Charmeleon`
  )
  </code></pre>
  
  <p>So the final result of the <code>SELECT</code> query I need would result in something in this</p>
  
  <pre><code>Wartotle
  Pichu
  Pikachu
  Pichu
  Squirtle
  Wartotle
  Wartotle
  Diglett
  </code></pre>
  
  <p>I know it's a bit confusing request but it's the query I'm looking for</p>