title: sql - How to only apply condition in WHERE if condition is met
body: <p>I'm having trouble implementing this, where I want to have the condition in WHERE removed/added if a condition is met.</p>
  <p>sample:</p>
  <pre><code>select x.color, x.shape
  from table x
  x.finish = 'shine'
  </code></pre>
  <p>What I want this to do is that if <code>x.color</code> is not, for example, 'Red', then <code>x.finish = 'shine'</code> in <code>WHERE</code> should not apply.</p>
  <p>TIA!</p>