
715 S.E.2d 884 (2011)
STATE of North Carolina
v.
Marcellus JAMES.
No. COA10-1375.
Court of Appeals of North Carolina.
September 20, 2011.
*885 Roy Cooper, Attorney General, by Elizabeth N. Strickland, Special Deputy Attorney General, for the State.
Economos Law Firm, PLLC, Morrisville, by Larry C. Economos, for defendant.
THIGPEN, Judge.
After performing a Narcotics Field Test Kit ("NIK test"), police officers arrested Marcellus James ("Defendant") for possession with intent to sell and deliver crack cocaine. While at the police station awaiting processing, Defendant ate the crack cocaine. We must decide whether (I) the trial court erred by allowing a police officer to testify that the substance was crack cocaine based on his visual inspection; (II) the trial court erred by allowing two police officers to testify regarding the results of the NIK test; and (III) Defendant received ineffective assistance of counsel. Having eaten the crack cocaine, thereby preventing the State from conducting additional chemical analysis, we hold Defendant has forfeited his right to challenge the admission of the police officers' testimony based on Defendant's own wrongdoing. Regarding Defendant's remaining argument, we find no error.
On 27 April 2010, Officer Sherry Donelson, a detective with the Wilmington Police Department, was patrolling in an unmarked vehicle when she was waived over by Defendant. As Officer Donelson opened her car door, displaying her utility uniform and badge, Defendant started running and dropped something on the ground. Officer Donelson radioed for assistance and pursued Defendant in her car until he stopped running.
Officers Robert Simpson and Joshua Brown were in the vicinity and responded to the radio call. After Officer Simpson secured Defendant, he and Officer Donelson searched for the object Defendant had dropped. They found a colored, balled-up wrapper with what "appeared to [Officer Donelson] to be a little rock substance." Officer Simpson testified, over objection, that based on his training and experience, the substance *886 appeared to him "to be crack cocaine." Officer Brown performed a NIK test on the contents of the wrapper by swabbing the substance with a small "moist towelette ... about the size of a[n] alcohol wipe[.]" Officer Brown testified, without objection, that the wipe turned blue, thereby indicating that the substance tested positive for cocaine. Officer Simpson also testified, over objection, that "the wipe turned blue, which is an indication that [the substance is] positive for cocaine base." Officer Simpson arrested Defendant for possession with intent to sell and deliver crack cocaine and took him to the Wilmington Police Department for processing.
At the police station, Officer Simpson placed the wrapper containing the cocaine on the other side of a glass divider from Defendant and unhooked Defendant's handcuffs to secure him to a ring on the wall. As Officer Simpson walked into the control room, Defendant grabbed the crack cocaine from under the glass divider and swallowed it. Officer Simpson took Defendant to a hospital emergency room. Defendant was in Officer Simpson's custody the entire time he was at the hospital. In an effort to determine how to treat Defendant, the doctor asked Defendant, "What did you take or what did you eat?" Officer Simpson testified that Defendant told the treating doctor "that he ate approximately a gram of crack cocaine." Officer Simpson also stated that once his supervisor arrived at the hospital, Defendant repeatedly asked Officer Simpson and his supervisor, "how [Officer Simpson] was charging him since he had ate the crack."
After Defendant received treatment, Officer Simpson took him back to the police department where Defendant was processed and also charged with resisting a public officer and destroying criminal evidence. Officer Simpson then took Defendant to a probable cause hearing before a magistrate. Officer Simpson testified that Defendant asked the magistrate, "How are they charging me with the crack, when I ate it? Or possessing the crack when I ate it?"
Defendant was charged with possession with intent to sell and deliver cocaine, resisting a public officer, and altering or destroying criminal evidence. The trial court dismissed the charge of resisting a public officer and reduced the charge of possession with intent to sell and deliver cocaine to possession of cocaine. A jury convicted Defendant of possession of cocaine and destroying criminal evidence. Defendant then pled guilty to attaining the status of a habitual felon, and the trial court sentenced Defendant to 70 to 93 months imprisonment. Defendant appeals.

I. Testimony by the Police Officers
Defendant first contends the trial court erred by (1) allowing Officer Simpson to testify that the substance found on the ground was crack cocaine based on his visual examination and (2) allowing Officer Simpson and Officer Brown to testify regarding the results of the NIK test which indicated the presence of cocaine on the substance.
Under normal circumstances, we agree that Officer Simpson and Officer Brown's testimony would not have been admissible at Defendant's trial. Officer Simpson's visual identification testimony would be inadmissible because testimony identifying a controlled substance "must be based on a scientifically valid chemical analysis and not mere visual inspection." State v. Ward, 364 N.C. 133, 142, 694 S.E.2d 738, 744 (2010); see also State v. Meadows, 201 N.C.App. 707, 712, 687 S.E.2d 305, 309 (holding that the trial court erred by admitting a police officer's lay testimony that he "collected what he believed to be crack cocaine" based on his visual identification), disc. review denied, 364 N.C. 245, 699 S.E.2d 640 (2010). Furthermore, the testimony regarding the results of the NIK test would be inadmissible because the State did not sufficiently establish the reliability of the NIK test pursuant to "any of the `indices of reliability' under Howerton [v. Arai Helmet, Ltd., 358 N.C. 440, 597 S.E.2d 674 (2004)] or any alternative indicia of reliability[.]" Meadows, 201 N.C.App. at 712, 687 S.E.2d at 308-09; see also State v. Helms, 348 N.C. 578, 581, 504 S.E.2d 293, 295 (1998) (holding that it was impermissible to allow a lay witness to testify regarding the results of an HGN test, a field sobriety test, when the reliability of the test was not sufficiently established). Under the unique circumstances of this case, however, we conclude *887 Defendant forfeited his right to challenge the admission of this otherwise inadmissible testimony.
Our courts have recognized that even constitutional protections are subject to forfeiture as a result of improper conduct by a defendant. For example, this Court has held that a defendant forfeits his right to the assistance of counsel by engaging in "willful actions ... that result in the absence of defense counsel[.]" State v. Quick, 179 N.C.App. 647, 649-50, 634 S.E.2d 915, 917 (2006); see also State v. Montgomery, 138 N.C.App. 521, 524, 530 S.E.2d 66, 69 (2000) (stating that "an accused may lose his constitutional right to be represented by counsel of his choice when he perverts that right to a weapon for the purpose of obstructing and delaying his trial"). Similarly, a defendant "who obtains the absence of a witness by wrongdoing forfeits the constitutional right to confrontation." State v. Lewis, 361 N.C. 541, 549, 648 S.E.2d 824, 830 (2007) (citation and quotation marks omitted). Finally, "[a] defendant who misbehaves in the courtroom may forfeit his constitutional right to be present at trial." Montgomery, 138 N.C.App. at 525, 530 S.E.2d at 69 (citation omitted); see also Illinois v. Allen, 397 U.S. 337, 343, 90 S.Ct. 1057, 1060-61, 25 L.Ed.2d 353, 359 (1970) (holding that "a defendant can lose his right to be present at trial if, after he has been warned by the judge that he will be removed if he continues his disruptive behavior, he nevertheless insists on conducting himself in a manner so disorderly, disruptive, and disrespectful of the court that his trial cannot be carried on with him in the courtroom").
Just as a defendant can lose the benefit of a constitutional right established for his or her benefit, we hold a defendant can lose the benefit of a statutory or common law legal principle established for his or her benefit in the event that he or she engages in conduct of a sufficiently egregious nature to justify a forfeiture determination. In this case, having prevented the State from conducting additional chemical analysis by eating the crack cocaine, Defendant has little grounds to complain about the trial court's decision to admit the police officers' testimony identifying the substance as crack cocaine based on visual inspection and the NIK test results. Defendant has lost his right to challenge the admission of Officer Simpson and Officer Brown's testimony due to his conduct of eating the crack cocaine.
At trial, Officer Simpson explained that "[e]very piece ... of the narcotics that we get in, especially when we just field test it, we actually submit it to the police department and they, at the DA's request, submit [it] to the SBI for testing." Defendant, however, ate the crack cocaine before the SBI could conduct a chemical analysis of the substance. After eating the crack cocaine, Defendant asked Officer Simpson and his supervisor, "how [Officer Simpson] was charging him since he had ate the crack." Similarly, at the hearing before the magistrate, Defendant asked, "How are they charging me with the crack, when I ate it? Or possessing the crack when I ate it?" It is clear from Defendant's statements that he swallowed the crack cocaine for the express purpose of preventing the State from charging him with possession of cocaine. "The North Carolina Supreme Court has long recognized as a basic principle of law and equity that no man shall be permitted to take advantage of his own wrong[.]" Belk v. Cheshire, 159 N.C.App. 325, 330, 583 S.E.2d 700, 705 (2003) (quotation marks and citation omitted).
Given Defendant's deliberate and successful attempt to preclude the State from conducting additional chemical analysis, Defendant has forfeited his right to challenge the admission of Officer Simpson's visual identification testimony and Officer Simpson and Officer Brown's testimony regarding the results of the NIK test. Accordingly, the trial court did not err by admitting the challenged testimony.

II. Ineffective Assistance of Counsel
Defendant next contends he received ineffective assistance of counsel because his counsel did not make a motion to suppress Defendant's statements to the doctor and magistrate, which Defendant argues were obtained in violation of Defendant's Fifth and Sixth Amendment rights because he was not advised of his Miranda rights. We disagree.
*888 When a defendant attacks his conviction on the basis that counsel was ineffective, he must satisfy a two-prong test to show that his counsel's conduct fell below an objective standard of reasonableness:
First, the defendant must show that counsel's performance was deficient. This requires showing that counsel made errors so serious that counsel was not functioning as the "counsel" guaranteed the defendant by the Sixth Amendment. Second, the defendant must show that the deficient performance prejudiced the defense. This requires showing that counsel's error w[as] so serious as to deprive the defendant of a fair trial, a trial whose result is reliable.
State v. Braswell, 312 N.C. 553, 562, 324 S.E.2d 241, 248 (1985) (citing Strickland v. Washington, 466 U.S. 668, 687, 104 S.Ct. 2052, 2064, 80 L.Ed.2d 674, 693 (1984)).
"It is well established that Miranda warnings are required only when a defendant is subjected to custodial interrogation." State v. Patterson, 146 N.C.App. 113, 121, 552 S.E.2d 246, 253 (citation omitted), disc. review denied, 354 N.C. 578, 559 S.E.2d 548 (2001). "[I]nterrogation under Miranda refers not only to express questioning, but also to any words or actions on the part of the police (other than those normally attendant to arrest and custody) that the police should know are reasonably likely to elicit an incriminating response from the suspect." State v. Leak, 90 N.C.App. 351, 355-56, 368 S.E.2d 430, 433 (1988) (emphasis added) (citation and quotation marks omitted). "[V]olunteered statements of any kind are not barred by the Fifth Amendment." State v. Walls, 342 N.C. 1, 28, 463 S.E.2d 738, 750 (1995) (citation and quotation marks omitted), cert. denied, 517 U.S. 1197, 116 S.Ct. 1694, 134 L.Ed.2d 794 (1996). "In order to determine the voluntariness of a statement, we must assess the totality of all the surrounding circumstances." State v. Wiggins, 334 N.C. 18, 28, 431 S.E.2d 755, 761 (1993) (citation and quotation marks omitted).
While we agree Defendant was in custody, we conclude his incriminating statements were not made in response to police interrogation. Moreover, Defendant's statement to the magistrate was voluntary. The record indicates Defendant told the doctor "that he ate approximately a gram of crack cocaine" in response to the doctor's, not Officer Simpson's, questioning. Specifically, the doctor asked Defendant, "What did you take or what did you eat?" so that the doctor could determine how best to treat Defendant. See State v. Holcomb, 295 N.C. 608, 611-12, 247 S.E.2d 888, 891 (1978) (although defendant was in custody, evidence did not result from "custodial interrogation" where police did not initiate questioning). Additionally, the record indicates that Defendant's statement before the magistrate was spontaneous and not the result of police questioning. When the magistrate "was advising him what he was being charged with," Defendant asked the magistrate, "How are they charging me with the crack, when I ate it? Or possessing the crack when I ate it?"
Considering "the totality of all the surrounding circumstances[,]" Wiggins, 334 N.C. at 28, 431 S.E.2d at 761, we conclude Defendant's statements were not in response to police interrogation and his statement to the magistrate was voluntary. Thus, his Fifth Amendment rights were not violated because he had not received Miranda warnings. See State v. Monk, 63 N.C.App. 512, 519, 305 S.E.2d 755, 760 (1983) (holding that no Miranda warnings were required because the defendant's "initial statement, made in the jail cell, was not the result of custodial interrogation but was volunteered by defendant"). Accordingly, Defendant's counsel was not ineffective when he did not make a motion to suppress Defendant's incriminating statements.
NO ERROR.
Judges CALABRIA and ERVIN concur.
