This paper considers single-server queues with several customer classes. Arrivals of customers are governed by the underlying continuous-time Markov chain with finite states. The distribution of the amount of work brought into the system on arrival is assumed to be general, which may differ with different classes. Further, the service speed depends on the state of the underlying Markov chain. We first show that given such a queue, we can construct the corresponding new queue with constant service speed by means of a change of time scale, and the time-average quantities of interest in the original queue are given in terms of those in the new queue. Next we characterize the joint distribution of the length of a busy period and the number of customers served during the busy period in the original queue. Finally, assuming the FIFO service discipline, we derive the Laplace-Stieltjes transform of the actual waiting time distribution in the original queue.