def lower_case(value):
    """Return the value lowercased if it is within a specific set of values.

    :param value: The value to be checked.
    :type value: str
    :returns:
        The lowercased value if it is equivalent to
        'none', 'retrieve', or 'retain'.
    :rtype: str
    """
    lower_set = set(['none', 'retrieve', 'retain'])
    if isinstance(value, str):
        if value.lower() in lower_set:
            value = value.lower()
    return value
