def convert_for_sql(value, check_set=set(), single=True):
    """Convert a value for inserting into MySQL.

    :param value: Value that should be checked for conversion.
    :type value: misc
    :param check_set: Set of values to check against.
    :type check_set: set
    :param single: Indicates whether single quotes should be used.
    :type single: bool
    :returns:
        Returns either "NULL" or the value encapsulated in quotes
        ("'value'" or '"value"')
    :rtype: str
    """
    if value in check_set:
        value = 'NULL'
    elif single == True:
        value = f"'{value}'"
    else:
        value = f'"{value}"'
    return value
