Conditional to compare two text

hello everyone, a query I have two values ​​in different rows and I would like to add it if these values ​​are equal, what conditional would I use to compare two texts, thanks

Are those rows in the same table? Can we know more about your use case for this?