title: Check if a column exists in SQLite
body: <p>I need to check to see if a column exists and if it doesn't exist add it.  From my research it looks like sqlite doesn't support IF statements and case statement should be used instead. </p>
  
  <p>Here is what I have so far: </p>
  
  <pre><code>SELECT CASE WHEN exists(select * from qaqc.columns where Name = "arg" and Object_ID = Object_ID("QAQC_Tasks")) = 0 THEN ALTER TABLE QAQC_Tasks ADD arg INT DEFAULT(0);
  </code></pre>
  
  <p>But I get the error: Near "ALTER": Syntax error.</p>
  
  <p>Any ideas?</p>