The body can't tell the difference between sugars that come from an apple or from a breakfast cereal.
All sugars, whether they are found naturally in foods (like those in milk, fruit and vegetables) or are added to foods during processing, are treated by the body in the same way.
They are all carbohydrates and provide the same amount of energy, 17 kilojoules per gram.