1SELECT ProcductCode AS Id, ProductPrice AS Price
2FROM Products WITH (NOLOCK)
3WHERE ProductCode IN ('efg', 'abc', 'xyz')
4ORDER BY (CASE WHEN ProductCode = 'efg' THEN 1
5 WHEN ProductCode = 'abc' THEN 2
6 WHEN ProductCode = 'xyz' THEN 3
7 ELSE 4 -- in case you change the `where`, put them last
8 END);