You have to construct the SQL dynamically.
i.e.
sql = "select col_nam from table where 1=1 "; // so we can just use AND
if ( txtcity != null ) {
sql += "and city like '%" + txtcity + "%' ";
}
if ( txtArea != null ) {
sql += "and area like '%" + txtarea + "%' ";
}
if ( txtZip != null ) {
sql += "and zip like '%" + txtzip + "%' ";
}