If I understand you correctly, you want to get the original value that was added to the hash set. So since “Alice” is the value in the hash set, you want to get that for inputs of “alice”, or “aLICe”.
Efficiently, this is not possible with a hash set. You would have to loop through the elements of the hash set to find the original value, making it as efficient as a list.
What you could do is have a dictionary instead which allows you to have a case-insensitive lookup but return the real value instead:
var names = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
{
{ "Alice", "Alice" },
{ "Bob", "Bob" },
{ "Charles", "Charles" }
};
Console.WriteLine(names["alice"]); // Alice
Console.WriteLine(names["aLICe"]); // Alice