I have heard this type of argument too many times: You are criticising X using well researched facts and arguments. Your interlocutor, states that Y is much worse with equally well researched facts and arguments. X and Y are linked in a general sense: two alternative medicines (homeopathy & chiropractics), two politicians (May & Corbyn), two historical figures (Hitler & Stalin). So far so good, it is a conversation.
Now, your interlocutor uses his arguments that Y is worse to suggest that X is in fact, good. This logical fallacy asserts that because Y is much worse than X, therefore X would be a good thing.
What is this logical fallacy called?
Clearly in a binary choice, the lesser evil should win: X is bad, Y is worse therefore you should chose X. ⚠ This is not what this question is about.⚠ Please re-read the last sentence.
This logical fallacy asserts that because Y is much worse than X, therefore X would be a good thing. Not that it is a better choice, less-worst choice, the only choice but that it is a worthwhile choice on its own.
In addition, there might not be just two choices or one might not even be asked to make a choice: the fact that Y is worst makes X good regardless of X's merits.