Yogurt is fermented, so lactose is converted into lactic acid mostly.
Natural cheese is also fermented, but at different conditions which cause casein (one group of milk protein, the other is whey) to coagulate out. That protein (which still contains some milk fat and lactose because it doesn't separate wholly) is then aged and during aging some additional fermentation can occur (which is why cheese has holes in it).
Butter is mostly just the milk fat separated; since sugar is insoluble in fat the lactose mostly stays in the liquid side product (= buttermilk).