• Yes, u can use like that

    Select [flag ='y'].some_data from [where] [flag ='y']