"SELECT * FROM yourTable WHERE city = 'c7'"
"SELECT * FROM yourTable WHERE city LIKE '%c7%'"
Of course you can change '%c7%'
to '%c7'
or 'c7%'
depending on how you want to search it. For exact match, use first query example.
$result = mysql_query("SELECT * FROM yourTable WHERE city = 'c7'");
$matchFound = mysql_num_rows($result) > 0 ? 'yes' : 'no';
echo $matchFound;
You can also use if
condition there.