Use a subquery:
SELECT * FROM
SELECT * FROM users ORDER BY rand() LIMIT 20
ORDER BY name
The inner query will select 20 users at random and the outer query will order the selected users by name.
Willing to Learn SQL? Join this SQL training course and certification program by Intellipaat.
You can also go through the below MySQL tutorial video that will help you out in a better way: