To be honest, I haven't understood what you're asking but...
If studentID is stored in the DB as a String, try the following:
statement.executeQuery("SELECT * FROM Results WHERE studentID = '" +...