We consider a problem of optimal control of a two-state Markov process. The objective is to minimize a total discounted cost over an infinite horizon, when the capabilities of the control effort are different in the two states. The necessary optimality conditions allow studying state-costate dynamics over the regular and singular control regimes. By making use of the properties of the costate process we prove the optimality of a threshold policy and calculate the value of the threshold in some specific cases of the cost function, as well as in a case where a probabilistic constraint is imposed on the state variable. The distribution function of the state variable and the thresholds are expressed as a series of the modified Bessel functions.