Remember to ask questions in hypotheticals. You should not make admissions in a public forum. Generally speaking, yes, a victim of a crime may be charged with another crime that was discovered by law enforcement while investigating the first crime. Whether you can be charged in your specific case depends on the specific facts. Generally, your admission to a crime without any other evidence does not result in a conviction. You should speak to an attorney about the specifics of your case. The prosecution will still likely prosecute the case in which you are a victim, even thouth you may have been committing another crime. Whether the jury hears about your other crime will also depend on the spefics of your case. Good luck.
If they have evidence to support a drug charge against you, they can charge it. They can charge you even if they are also charging the person who robbed you with a crime. You should consult with a criminal defense attorney to assist you through this process. There things an attorney can help you with to limit the damage against you as much as possible.