If you have fewer than 9 levels of your current class, this scroll will grant you the same skill you would have received at level 9. In most cases, this is a waste of a rare item, since you cannot voluntarily change classes earlier than the next multiple of 10. The ideal level to use the scroll is 19, 29, 39, etc, or immediately after you decline the option to change class.
Once you have learned the appropriate skill for your character class, the skill or power will be chosen randomly, and might duplicate a skill you already possess, unless you are wearing the helm of knowledge.
If you have already learned your class skill, then wearing a helm of knowledge gives you your missing skills in order of usefulness. Identification > relocation > telepathy are learned first, and corpse preservation > origami > ventriloquism are learned last. After that, it grants a random skill.