xiàng​jī​xíng​shì

to act as circumstances dictate