Simple Search Relevance in mySQL

Many times when one wants to build their own search engine, he or she wishes to sort the results by relevancy. MySQL provides some useful syntax to make this possible. Below is a short code snippet to a simple relevance calculation and order by it.

ORDER BY ( 
( CASE WHEN column_name LIKE  'criteria'
THEN 1
ELSE 0
END )
+
( CASE WHEN column_name2 LIKE  'criteria2'
THEN 1
ELSE 0
END )) DESC