When I test below sql queries:
1. SELECT * FROM table WHERE username='username' AND password = 'password'; 2. SELECT * FROM table WHERE username='Username' AND password = 'Password';
Both queries return the same result even if the username and password are case sensitive
Use this query
SELECT * FROM table WHERE username='Username' AND binary password = 'Password';
Syntax for Query Based on Case
SELECT * FROM `table` WHERE BINARY `column` = 'value'
In your case, this would become:
SELECT * FROM table WHERE BINARY username='Username' AND BINARY password = 'Password';