title: SQL Select rows where col1 or col2 equals variable
body: <p>So I want to select rows from table where col1 or col2 equals to variable, but if there is already row selected where col1 equals to variable (variable X) and col2 is anything else (variable Y) then it won't select another row where col2 equals to variable X and col1 equals to that variable Y. Everything ordered by column TIME descending.</p>
  
  <p>Let's say this is my table:</p>
  
  <pre><code>COL1    COL2    TIME    COL4
  1       2       0       A
  1       2       1       B
  2       1       2       C
  1       3       3       D
  3       1       4       E
  4       2       5       F
  3       4       6       G
  1       2       7       H
  4       1       8       I
  </code></pre>
  
  <p>And let's say that variable X equals to 1, then I want to have these rows:</p>
  
  <pre><code>COL1    COL2    TIME    COL4
  4       1       8       I
  1       2       7       H
  3       1       4       E
  </code></pre>
  
  <p>So it won't show me this row</p>
  
  <pre><code>COL1    COL2    TIME    COL4
  2       1       2       C
  </code></pre>
  
  <p>because there is already a combination where col1/col2 is 2/1 or 1/2.</p>
  
  <p>Sorry if I explained it in a bad way, but I can't think of better explanation.</p>
  
  <p>Thank you guys.</p>