You can add a CASE
clause inside your ORDER BY
clause:
SELECT nazov
FROM tbPredmety
ORDER BY
-- item(s) with item_id 1 will appear first
CASE WHEN item_id = 1 THEN 0 ELSE 1 END,
nazov ASC
I used THEN 0 ELSE 1
but for your purpose you could use any pair of values in which the former value is considered less than the latter value when sorting.
EDIT: For mysql you may need to use CASE ... END CASE
. If the above does not work try changing END to END CASE.