Call SQL query from Java code

I executed this SQL query in SQL developer successfully: SELECT COUNT(*) “All”, COUNT(CASE WHEN TYPE = ‘Critical’ THEN 1 END) “Critical”, COUNT(CASE WHEN TYPE = ‘Info’ THEN 1 END) “Info”, …