I think your best bet is just to read the chapter guidelines in the front of your coding book. Then, with enough practice you will eventually remember what to sequence first. It's just a matter of doing it enough, but anytime you're unsure, the guidelines are where you will find your answers.
For diabetes, check the Chapter-Specific Coding Guidelines in the front of your coding book for Chapter 3 (Endocrine, etc.), under "assigning and sequencing diabetes codes and related conditions." This has a great explanation. Also, when you look up the diabetes code itself, look for instructions to "code first, "code also," "code additional." These tell you if you need other codes and the sequence (e.g., "code also" means that code would go after). So pay close attention to the instructions above the code. Make it a habit to always check if there are instructions; again, soon you will become familiar enough to know what to do without having to look it up each time.
There are also general guidelines before the chapter guidelines that cover "etiology/manifestation conventions." I must admit, when I first started coding, the guidelines seemed wordy and boring and didn't always make sense to me. I've come to see them now, however, as the first place to check when I have a question.
I'm not sure if this answer is quite what you were looking for/asking about. If you have a specific example (a certain condition with your diabetes), post that and we'll help out.