1. Get a list the ids of all rows in your table. I'm assuming you have one column for the row id and another holding the tip as a VARCHAR.
2. Pick a random number "r" between 0 and (the number of rows in your table - 1)
3. Get the row id of the row "r"
4. Select the row with this id
Code:
1. SELECT row_id FROM my_table // store this in "rows_returned"
2. SELECT COUNT(*) from my_table // store this as "the_count"
srand([[NSDate date] timeIntervalSince1970]); // seed random number generator
int r = rand() % (the_count - 1);
3. int row_id = rows_returned[r].row_id
4. SELECT my_tip FROM my_table WHERE row_id = [r]