How to have if "string === string" in template?

Have you managed to make it work ? I crave for a detailed example of how to do that (add what content, in which file, and where in that file if that’s relevant).