invece di uno statement, utilizza un preparedStatement, e cambia leggermente la stringa slq:
codice:
Sql = "select * from tabella where nome=?";
PreparedStatement ps = con.prepareStatement(sql);
ps.setString(1, stringaChePrendi); 
// setto il 1° ? che trovo nella stringa sql
// ci possono anche essere + ?, basta settarli tutti
rs = ps.executeQuery();