Random item draw from Google Sheet based on column data

I have a field that draws a random item from a single row in a Google Sheet using the Sheety.io API function. This process works well, on a page refresh a new random row is pulled through from the Google Sheet.

What I want is for the random row to be dictated by the contents of another column. I have a text field in the Bubble app that is either Male or Female. If this is set to Female, I want the random row shown in the app to also contain Female in the gender column of the spreadsheet.