OR
instead AND
For the formula you provided:
=QUERY('Test'!A1:BM;"Select M, N, O, BK, AS where(M='Name' AND M='Names')")
Try using this approach instead:
=QUERY('Test'!A1:BM,"Select M, N, O where(M='Name' OR M='Names')")
Just make sure to adjust the range to fit your data values as needed.