title: Compare enum indexes of two SQL entries
body: <p>I need to compare the index of two enum values from two similar columns in two different tables.  The enum values are <code>New, Reviewed, Design, Production</code>, and are in ascending order of status in our process, so it should be relatively easy to do a compare based on the idea that<code>New == 1</code>, <code>Reviewed==2</code>, etc...</p>
  
  <p>I am currently trying:</p>
  
  <pre><code>SELECT CASE WHEN table1.review_status &lt; table2.review_status THEN table1.review_status
              WHEN table2.review_status &lt; table1.review_status THEN table2.review_status
              END
  </code></pre>
  
  <p>This seems to be doing an alphabetical compare on the strings <code>NEW</code>, <code>REVIEW</code>, etc...  I need it to compare the index, not the value.  Is this possible?</p>