ときとばあいによって
should time and circumstances permit
Expression
時ときと場合ばあいによっては次善じぜんを選ばなくてはならぬ。
You must choose the second-best policy according to the circumstances.