Suppose you wanted to pick a user at random from usergroups 6 and 9, then you could use this query:
Code:
SELECT user.username FROM user AS user WHERE usergroupid IN (6,9) OR FIND_IN_SET(6,membergroupids) OR FIND_IN_SET(9,membergroupids) ORDER BY RAND() LIMIT 1
The limit of 1 will be ignored, so either just take the first name shown, or set "Results to Show Per Page" at 1.