I need to pull a value from a line into the database, and if the value in this line is male, then output the text to the terminal, I try to do it like this

def get_genderr (self, chat_id, gender):
    with self.connection:
        self.cursor.execute ("SELECT * FROM` users` WHERE `chat_id`, 'gender'= (?,?)", (chat_id, gender)). fetchmany (1) # View gender
        if gender== 'male':
            print ('test')

I am writing in python sql3 database