Hello,
For this purpose you can use e.g. the following method:
CategoryInfoProvider ► GetCategories(Int32)
which returns dataset of all categories for specified site.
After that you can randomly choose one record from this dataset, so you will get a random category.
Another possible solution could be to create a list of all categories and then randomly select record from this list but in general, it's the same you are just able to specify from which categories do you want to select a random record.
Best Regards,
Martin Danko