Google Sheets Filter with WHERE Condition

This is what I have in my Google Sheets.

image

I want to pick just one row from this Sheet but with the WHERE Condition.

For example:

I want to Pick Random Data from a Row but only with No in the Marked column.

I feel this can be done if the data returned with No then loop it again to pick another row. But this will increase the limit of Read/Write.

More than that.

For example:

If the Random Data 5 is picked I want to updated Marked from No to Yes

So that the same row won’t picked again.

Any ideas on how can this be done?

Did you try the lookup operation with Return All Matches set to true?