Rolled-up tubular optical microcavities are a novel type of optical sensor for identifying different liquids and monitoring single cells. Based on a Mie scattering method, we systematically study the optical resonances and liquid sensing capability of microtubes. Analytical formulas are presented to calculate the resonant wavelengths λ(r), Q factors, sensitivities S and figures of merit QS. Both ideal and rolled-up microtubes are considered for different optical materials in tube walls (refractive indices ranging from 1.5 to 2.5) and for three setups: tube-in-liquid, hollow-tube-in-liquid and liquid-in-tube. It is found that for rolled-up microtubes, the highest QS can be achieved by using the liquid-in-tube setup and very thin wall thicknesses. A maximal sensitivity is found in the case of the liquid cylinder. Our theory well explains a recent experiment under the setup of tube-in-liquid. It is also found that, although it describes the case of tube-in-liquid well, the waveguide approximation approach is not suitable for the case of liquid-in-tube. The results could be useful to design better optofluidic devices based on rolled-up microtubes.