Hacking - SQL Injection - PostgreSQL - If Statement

Get response based on an if statement.

This is one of the key points of Blind SQL Injection, also can be very useful to test simple stuff blindly and accurately.

SELECT CASE WHEN condition THEN true-part ELSE false-part END;
 
SELECT CASE WEHEN (1=1) THEN 'A' ELSE 'B'END;