title: SELECT all rows WHERE id = id and another column = another column with that ID
body: <p>Hi everyone I am trying to </p>
  
  <pre><code> SELECT * rows WHERE id = (for example) 123.
  </code></pre>
  
  <p>Also, I want to select the column <code>favorite_number</code> from row 123 and select all WHERE id = <code>favorite_number</code> of id = 123. How can I do that?</p>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>SELECT * FROM users WHERE (id = :id) OR (id = :id AND get favorite_number from that row and search for it as ID);
  </code></pre>
  
  <p>Example: SELECT all rows with ID = 123. Also, if that row's column <code>favorite_number</code> IS NOT NULL AND does not = 0, select <code>favorite_number</code> (in this example, let's say the number is 456) and then search the same table: WHERE id = 456.</p>
  
  <p><strong>How can I do this all in one search query?</strong> I hope this is clear enough, thanks!</p>