What is the word for this type of hypocrisy?
What is the word for a person who freely uses an example, a quote, or a line of logic whenever it supports his own cause or argument, but sneezes at them if they are likely to undermine his cause or argument?
For example, person A says that four out five people do [whatever]. And whatever that is, it supports his argument. In another occasion, when he is presented with statistics he quotes Bertrand Russell's, “The fact that an opinion has been widely held is no evidence that it is not utterly absurd; indeed, in view of the silliness of the majority of mankind, a widespread belief is more likely to be foolish than sensible.”
I guess there many general words that could describe this attitude, for example hypocrisy. But I am looking for a word (or perhaps an idiom or a phrase) that specifically focuses on this type of hypocrisy.
Calling such a person a sophist would be a fine choice. The relevant definition from my Canadian Oxford Dictionary is
A person who reasons with clever but fallacious arguments.
The practice would sophistry, defined as
The use of intentionally deceptive or specious arguments or reasoning, especially as a dialectic excercise.
And the argument itself would be a sophism, defined as
A plausible but false argument, especially one intended to deceive or display ingenuity in reasoning.
A hypocrite is "a person who acts in contradiction to his or her stated beliefs or feelings" (Merriam-Webster dictionary), so "hypocrite" doesn't fit your example.
Someone who does what you describe is being deceitful, dishonest, engaging in chicanery. Maybe you could also call them a sophist: "a person who reasons adroitly and speciously rather than soundly" (dictionary.com).