Why I can not use check if/else with string == ''text''

Why I can not use check if/else with string == ‘‘text’’