If the variable - argShowCourse contains the name of a column in your table, you would code the following:
String sqlQuery = "SELECT * from modules WHERE " + argShowCourse + " = 'O'";
If the variable - argShowCource contains the value you want to search for, you would code...