こと次第 しだい
kototo shidaide

Expression

1. if things permit; under certain circumstances