opportunism

the policy or practice, in politics or otherwise, of adapting actions, etc., to expediency or circumstances (often with implication of sacrifice of principle).