title: select from column if exist, if not value is NULL
body: <p>I have a windows forms application (C#) that reads some data from MySQL database. In a new version I needed to add a new column in one of the tables (to add some functionality). Sometimes I need to make a restore database (from dump file). If I restore the old table from the old database (without the new column) I get "unnknown column" error.</p>
  
  <p>How should I alter my SQL command to select data from this table? If 'newcolumn' exists, I need to select data, if not I need to select NULL.</p>
  
  <pre><code>MySqlDataAdapter da = new MySqlDataAdapter(
          "SELECT my_id AS Id,myColumn1 AS Column1,myColumn2 AS Column2,
           newcolumn AS NewColumn (here IF NOT EXIST = NULL)", connection);
  da.Fill(izpis_podatkov);
  </code></pre>
  
  <p>Thank you!</p>