Пример данного кода возврашает только первую колонку. Надо получить password и email ..
String queryDataBase = "SELECT nickname,password,email FROM users WHERE nickname = ? AND password = ? AND email = ?";
PreparedStatement preparedStatement = connection.prepareStatement(queryDataBase);
preparedStatement.setString(1, name);
preparedStatement.setString(2, password);
preparedStatement.setString(3, email);
ResultSet resultSetQuery = preparedStatement.executeQuery();
if (resultSetQuery != null){
byte i = 1;
while(resultSetQuery.next()) {
System.out.println(resultSetQuery.getString(i));
i++;
}