 <p>Your syntax is wrong, and doesn't produce anything except an error message as you've written it here.</p> <p>If I understand your question correctly, this should produce the output you want:</p> <pre><code>SELECT old_column, CASE old_column WHEN 'A' THEN 1 WHEN 'B' THEN 2 WHEN 'C' THEN 3 ELSE 0 END AS new_column FROM table_name </code></pre> <p>A <code>SELECT</code> does exactly what it says it does - it selects the data, but doesn't actually alter it's content.</p> <p>To <em>permanently</em> add a new column and populate it, you'll need to first <code>ALTER TABLE</code> to add the new column, and then <code>UPDATE</code> that new column's content.</p> <pre><code>ALTER TABLE table_name ADD COLUMN newcolumn integer; UPDATE table_name SET newcolumn = CASE oldcolumn WHEN 'A' THEN 1 WHEN 'B' THEN 2 WHEN 'C' THEN 3 ELSE 0 END; </code></pre> <p>For future reference: If you want help with your SQL syntax, include the actual code you've tried that isn't working, instead of inventing something as you go or re-typing. With SQL-related questions, it's almost always a good idea to post some sample data and the output you'd like to obtain from that data, along with your <em>actual</em> SQL code trying to produce that output. It makes it much easier to help you when we can understand what you're trying to do and have samples to use.</p>