It takes more CPU time, If the WHERE condition is not proper, to fetch rows – since more rows. You should use the WHERE clause to filter the records and fetching only the necessary records. Introduction. You can use CASE statement instead of IF..ELSE clause to do conditional where clause. The following examples show how to use some common search conditions in the WHERE clause. The SQL WHERE clause is used to specify a condition while fetching the data from a single table or by joining with multiple tables. The examples so far have shown a WHERE clause with one criteria. All Rights Reserved. Active 9 months ago. Good Data analytic skills (Data Warehousing and BI). Overview. The MySql IF statement works like this: IF(,