Intent of the Question & Opening the Door: Designed to elicit or answer was gratuitously given?
The Open-Door doctrine (also referred to as rebuttal evidence or opening the door) allows for otherwise inadmissible evidence to sometimes become admissible:

For previous posts on Opening the Door, click here, here and here.
While this doctrine is common law, there is one part of it that has been codified in SCRE 404(a) for character evidence:

If the accused takes the stand and begins speaking on his great character, then it is likely that he has opened the door and the State can rebut that testimony under 404(a)(1).
But what happens when another witness testifies about the good character of the defendant? If the defense asks another witness a question about the defendant and the witness gives testimony about the defendant's good character, then the question will be: was defense counsel's question designed to elicit that good character answer?
In a recent SC Supreme Court case, this issue came up. The Supreme Court made clear that the State cannot introduce rebuttal evidence when the witness gratuitously offered the character evidence:

Therefore, the Court had to decide if defense counsel elicited the response. If the defense elicited the response, then they would have opened the door. If they had not elicited that response, then they would not have opened the door. The State argued that defense did elicit the answer (i.e., they opened the door):

The Court ultimately agreed with the trial judge and held that the defense counsel did not elicit the answer from the witness, and therefore 404(a) did not apply.