You just need to do all this job in some regular way.
It is nearly straightforward if you want to develop measure conversion in basic measures, say, length, mass, time, electric charge. It's going to be much more difficult if you are going to convert combined values, such as cm/sec or g/cm² (pressure) and the like; it will need some understanding of basic physics and good deal of thinking. For now, I'll limit my advice to the idea of the simplest case.
Basically, you need to develop some universal class representing a set of the measurement units (this is how it is correctly called) of the same physical measure, such as length. It could be some collection, or, probably, more than one collections, like dictionaries indexed by, say, name, and, another one, say, conversion factor.
What would be the element of this set? It should be a type with such properties as name ("centimeters"), abbreviated name ("cm"), and a conversion factor relative to the base measurement unit, say, 1. Each instance of the set class can have a property defining a base unit (it could be expressed just as the index of one of the elements), the one of the conversion factor of 1. Other elements of the set will have conversion factors relative to this base measurement unit.
Then you should create several instances of this set class (one for length, another for mass, etc.), populate each with measurement units. This will be the basic structure you would use for all the general cases of unit transforms, general unified approach. You can further develop this system to deal with combined physical measures.
—SA