title: Getting value from array in a SELECT statement
body: <p>Is it possible to define an array of text fields (or any data type) and select a value from it, all within a single statement? For example:</p>
  
  <pre><code>SELECT ARRAY['First', 'Second', 'Third'][mytable.state] as interpreted_state WHERE mytable.id = 1;
  </code></pre>