We present a new numerical method to obtain the finite- and infinite-horizon ruin probabilities for a general continuous-time risk problem. We assume the claim arrivals are modeled by the versatile Markovian arrival process, the claim sizes are PH-distributed, and the premium rate is allowed to depend on the instantaneous risk reserve in a piecewise-constant manner driven by a number of thresholds, i.e., multi-threshold premiums. We introduce a novel sample path technique by which the ruin problems are shown to reduce to the steady-state solution of a certain multi-regime Markov fluid queue. We propose to use the already existing numerically efficient and stable numerical algorithms for such Markov fluid queues. Numerical results are presented to validate the effectiveness of the proposed method regarding the computation of the finite- and infinite-horizon ruin probabilities for risk models including those with relatively large number of thresholds.