It will be hard to work in C# without knowing how to work with strings and booleans. But anyway:
String str = "ABC";
if (str.Contains('A'))
{
//...
}
if (str.Contains("AB"))
{
//...
}