title: SQL query return List
body: <p>I can't seem to get this working:</p>
  
  <p>My table column headers are 'genre' 'artist' 'album'
  and the params I'm passing in are (type, filter, value) ("artist", "genre", "Rock") where there are two rows in the db with "Rock" for the genre.</p>
  
  <p>When I follow the debugger, the 'while (reader.Read())' must return false because the loop is never entered and thus nothing written to the List.</p>
  
  <pre><code>    public static List&lt;String&gt; getWithFilter(String type, String filter, String value)
      {
  
          List&lt;String&gt; columnData = new List&lt;String&gt;();
  
          string query = "SELECT @type FROM Music WHERE" +
              " @filter = '@value'";
          SqlConnection connection = Database.GetConnection();
          SqlCommand getData = new SqlCommand(query, connection);
          getData.Parameters.AddWithValue("@type", type);
          getData.Parameters.AddWithValue("@filter", filter);
          getData.Parameters.AddWithValue("@value", value);
          connection.Open();
  
          using (connection)
          {
              using (getData)
              {
                  using (SqlDataReader reader = getData.ExecuteReader())
                  {
                      while (reader.Read())
                      {
                          columnData.Add(reader.GetString(0));
                      }
                  }
              }
          }
          return columnData;
      }
  </code></pre>