just as one wishes; depending on one's wishes
Used to express that something will happen or be done according to someone's desire or request. Often appears in phrases like 望み次第で or 望み次第だ.
成功するかどうかは、君の望み次第だ。
Whether you succeed or not depends on your own wishes.
望み次第で、どんなことでも叶えられる。
Depending on your wishes, anything can come true.
Compound of 望み (wish, desire) and 次第 (depending on). The exact historical derivation is uncertain, but the meaning is transparent from its components.