title: Compare Two Values in Same Column
body: <p>I need to compare the value in a single column in a single table. Here is a sample table:</p>
  
  <pre>
  ID  Cat     Color
  ======================
  1   red     maroon
  2   red     orange
  3   red     pink
  4   blue    violet
  5   blue    purple
  6   blue    indigo
  7   green   puke green
  8   green   hunter green
  </pre>
  
  <p>I am given 2 colors from the Color column. I need to know if they belong to the same Cat column. For example, I will be given maroon and orange. I need the value red returned. Violet and purple should return blue. Puke green and violet should return null.</p>
  
  <p>So far I have the following SQL but it's not exactly what I am looking for, especially with the Limit 1. I am looking for a single query to return Cat field without using Limit 1.</p>
  
  <pre>
  SELECT Cat
  From foo
  WHERE 
  Color = 'maroon'
  and
  Color = 'orange'
  LIMIT 1
  </pre>