As has been discussed before and answered, more than once, duplicate answers may suggest, but do not prove, that questions are duplicates.
That said, please consider this question: Determine if string is in list in JavaScript.
After almost seven years of being a good stand-alone question, it was closed today as being a duplicate. However, in my opinion it is not a duplicate even if the answer is similar, because the intent of the question is different. I'll quote from the notes I added to the end of the question (which was summarily deleted by someone--any thoughts on that?):
This question is not a duplicate of how do I check if an array includes an object [item] in JavaScript. The question here is "how to determine if a string is in a list" and the answer is "check if an array includes the item". The fact that how to perform that task is provided here as a convenience does not make the question a duplicate.
Imagine if this were a home improvement Q&A site. Someone asks, "how do I remove smoke smell from a room?" The selected answer is "paint the room" with a simple step-by-step guide on how to paint rooms. Would you close "how do I remove smoke smell" as a duplicate of "how do I paint a room"? No, you wouldn't unless you were not thinking clearly. The answers contain overlap, but duplicate answers aren't duplicate questions!
I see this as a potential reverse of the A-B problem. Sometimes, askers say "How can I do A" when in fact they want to do B, and they incorrectly restrict the possible range of answers by suggesting A instead of asking the more general question. (Along the lines of, "how do I use a drill" instead of "how do I make a hole"?) Most seem to agree this is an error by the questioner.
In this case, I asked for the more general "B", and the answer in this case was to perform specific implementation "A". (Along the lines of, "How do I make a hole?" and the answer being "use a drill.") But notice, asking for how to do B is not actually the same thing as asking how to do A, and people have gotten confused about that in closing the question as a duplicate. They seem to be committing a "B-A" error similar to the above "A-B" error.
Look at it this way. For all we know, there will be a future native means in JavaScript to check for whether an item is within a list of items. Someone will come along and answer my question with that technique, essentially "Use C!" Now the question is "How do I do B", and the answer will be "Do C.", and this is a duplicate question for "How do I do A"? No, it's not the same question, as the answer could be different, and it is only coincidentally the same as "A" at this time.
In fact, had I simply preferred a different answer than the one I did, such as deciding that a list of OR expressions was better, that alone would have made it very obviously different. But how can changing what I think is the subjectively correctly answer affect whether the question is a duplicate!?!?!
To round out the discussion by extending the examples above, some day we could answer the smoke smell question "Rent a Smoke-B-Gone from your local hardware store." (That obviously makes it a different question; how can a different answer change the fundamental nature of a question?) And similarly, some day a new wood disintegrator could be created, thus the answer to "how do I make a hole" can be "use a wood-disintegrator" which shows that it's not the same question as a "how do I use a drill"?
switch
statement introduces a list).A-B
argument. I have to agree with @ErikE. the duplicate flag is should only be used on duplicate questions. In this case it may be possible to have a solution that determines if a string is in an array that is more efficient/elegant than that of a more general solution to find an object in an array. The fact that the general answer satisfies both does not make the questions the same.Column IN (ColumnA, ColumnB, ColumnC)
, where the list of items is explicitly denoted and doesn't have to be in a special data structure.