Simply select all records that have a sum of 10. Then simply add this to the query to get 10 random results from it.
ORDER BY rand() LIMIT 10
Beware it isn't the most optimal query because first it figures out the rows having a sum of 10, then order them by random (meaning non-deterministic) and eventually only take 10 from that. But... it does the job.
Good luck!