Didn't actually test it, but this general idea should work:
SELECT ename, sal FROM emp WHERE sal = (SELECT MIN(sal) FROM emp)
UNION
SELECT ename, sal FROM emp WHERE sal = (SELECT MAX(sal) FROM emp)
Note that this can return more than 2 rows if there is more than one row with the (same) MIN or MAX value. It could also return just one row if both MIN and MAX happen to come from the same row (you could use UNION ALL to avoid that).
BTW, your query means: Get MIN(sal) and then get the ename
from a random row (and the same for MAX). In both MIN and MAX cases the MySQL decided to return the same random row.
However, in most databases other than MySQL, you could'n even have this kind of "random" query - you'd be required to include the ename
in GROUP BY.