You're confused - and rightly so! It would appear that your assumption is correct, in that C>E is a maj3, found in a major scale, and C>Eb is min3, found in a minor scale. It just happens that way. 2nds, 3rds, 6ths and 7ths all have 4 different flavours. dim., min., maj., and aug. The 4ths and 5ths have 3 flavours, dim., perfect and aug.
A second, C>D is called a maj.2, a third, C>E is a maj.3rd. make those intervals smaller by a semitone, they're minor, smaller by a tone and they're diminished. Make the major interval bigger by a semitone, it's augmented.
The 5ths can only be a semitone smaller (dim.) or a semitone bigger (aug.)
Intervals are found initially by the name of the two notes, counting from the lower. Thus - C>E=maj3; C>Eb=min3; C>Ebb=dim3; C>E#=aug3. Finally, if you take C>F, it's a perfect 4, but if that F note is actually technically E#, then the interval is aug3, not P4. So, we don't, and can't, use no. of semitones as an absolute criterion.
...And another thing! Intervals couldn't be realated to scale notes per se. There are three minor scales, so for instance, the 'seventh' in the natural minor is m7, while the 'seventh' in harmonic is major 7. How could those facts relate to whether a scale is major or minor...
And yet another! To help understand intervals, try inverting them. Majors become minors, and vice versa, while augs become dims, and vice versa. Perfects stay perfect. The 'rule of 9' applies. So, inverse of m3 = M6. inverse of M7 is m2. Inverse of P5 =P4. Give it a try, it may help make sense, where logic sometimes isn't the best.