Suppose, You want to search product with specified key and the products with stock should appear first in the search result.
SELECT * FROM `products` WHERE name LIKE 'na%'
ORDER BY CASE
WHEN id IN (602, 603, 18125) THEN 1
ELSE 2
END, name ASC