def METHOD_NAME(self, value: t.Any) -> t.Any:
    """
    If a where clause contains a ``Table`` instance, we should convert that
    to a column reference. For example:
    .. code-block:: python
        manager = await Manager.objects.where(
            Manager.name == 'Guido'
        ).first()
        # The where clause should be:
        await Band.select().where(Band.manager.id == guido.id)
        # Or
        await Band.select().where(Band.manager == guido.id)
        # If the object is passed in, i.e. `guido` instead of `guido.id`,
        # it should still work.
        await Band.select().where(Band.manager == guido)
    Also, convert Enums to their underlying values, and serialise any JSON.
    """
    return convert_to_sql_value(value=value, column=self.column)