I am making an automated roster selector called "Bathroom Tracker" in Google sheets.
I have one sheet "Master Sheet" with a matrix of Student names (Anonymized), T/F check Boxes, and their schedule. Columns are the class period, Cell data is the teacher (Anonymized).
I have a second sheet, "Filtered Sheet", where two drop downs are used to search for Teacher X's students in Y period.
Here is a link to a dummy data version: https://docs.google.com/spreadsheets/d/1Yy8F849TXrXvGsvWyeOuslsxTidNL60CFToQJrq0UEk/edit?usp=sharing
I am using the QUERY function, asking for it to select a range of columns if the cell data at [period] contains [teacher].
Here is the current cell function: =QUERY({'Master Sheet'!B3:V184}, "SELECT Col1,Col2,Col3,Col4,Col5,Col6,Col7,Col8,Col9,Col10,Col11,Col12 WHERE '"&T(C3)&"' CONTAINS '"&T(B3)&"' ")
If I replace the [Period] dropdown with the text "Col13", I get a working example: Working Example Screenshot
...But replacing the text in the period dropdown with data like "Col13" does not produce the same effect.
Any help in this would be much appreciated! Thank you!

