This is excellent r937 - I did this and worked like a charm !
Code:
SELECT * FROM `tbl` WHERE
`Name` LIKE '%an%'
ORDER BY
CASE
WHEN `Name` LIKE 'an%' THEN 1
WHEN `Name` LIKE '%an' THEN 1000
ELSE 500
END
I think I got how this is sorting the result-set based on the CASE value matching against the WHERE clause, but is there some detailed explanation to this ?
Docs doesnt have a sorting-by-where-clause example.
Thanks