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.