title: Postgres CASE Statement in an insert
body: <p>I have a table that i had to ALTER in Postgres. I would now like to insert some values for the rows that exists in the table based on a condition. I'm looking at using CASE blocks!</p>
  
  <p>Here is what I have:</p>
  
  <pre><code>INSERT INTO MyTable (value1, value2) values
      (1, SELECT t.name,
            CASE WHEN t.name IN ('MyName') THEN 1
            ELSE 2
          END AS value2
         FROM MyTable t);
  </code></pre>
  
  <p>I get an error:</p>
  
  <pre><code>ERROR: syntax error at or near "select"
  SQL state: 42601
  Character: 71
  </code></pre>
  
  <p>Any clues what it is?</p>