chameleon
Refers to the lizard known for changing color. Also used figuratively for a person who easily changes opinions or behavior to suit the situation.
A chameleon changes its body color to match its surroundings.
He changes his opinion depending on the situation, like a chameleon.
He changes his attitude like a chameleon depending on the situation.
She's a chameleon-like person who can fit in anywhere.