title: how to filter sql query results with matching string
body: <p>I have a database table in which one column contain the string value that is looks like dictionary in php.</p>
  
  <p>Table:College</p>
  
  <pre><code>Id  name    requirement
  1   x   {"users": ["A", "B"], "name": "*", "pool": "CSE", "place": "Bangalore"}
  2   y   {"users": ["A", "C"], "name": "*", "pool": "CSE", "place": "Chennai"}
  3   z   {"users": ["A", "B"], "name": "*", "pool": "ECE", "place": "Bangalore"}
  4   r   {"users": ["A", "D"], "name": "*", "pool": "EEE", "place": "UP"}
  </code></pre>
  
  <p>From this table I need to filter only those rows in which the requirements column contain “pool”:”CSE”.
  That is if pool is CSE or pool is ECE etc .</p>
  
  <p>Currently my php code for fetching whole table is:</p>
  
  <pre><code>    $query = "SELECT * FROM waitqueue";
      $result = mysql_query($query);
  
      echo "[";
      echo json_encode(mysql_fetch_assoc($result));
      while ($row = mysql_fetch_assoc($result))
          echo "," . json_encode($row);
      echo "]";
  </code></pre>
  
  <p>I dont want to change the above sql query.Because I need both conditions(full table and selected pool rows) from single query.So I wish to parse from results.</p>
  
  <p>How to match the "pool" and how can I filter those rows?</p>
  
  <p>Any one please suggest me.</p>
  
  <p>Thanks in advance.</p>