As ProTodd says, the choice of which video resolution the Apple TV will play is either/or. It is not possible to choose which resolution you want to play. If you choose HD video in the settings, then as long at there is an HD version available (as in the case of your Star Trek example) then the HD version of the file will be played. If you choose SD then the standard definition file will be played, always. On the other hand, if you have SD chosen in the Apple TV setting and only an HD file is available then that file will be played.
The HD-SD badge is accomplished by iTunes inserting a randomly generated 9-digit "contentID" tag into both versions of a video file when they are downloaded. There are actually two files downloaded, but they appear as one file in the iTunes library with the HD-SD badge shown in the image above. As far as I know MetaX does not have the ability to add this "contentID" tag to ripped video files, but an app called Subler does.