Select a random row from a table with the following query:
SELECT * FROM table ORDER BY random() LIMIT 1;