Using IF ... PREPARE ... EXECUTE ... DEALLOC to create a temporary block?
NOT EXISTS is more readable and does not need to go through to get a full count.
BEGIN
    IF (NOT EXISTS(SELECT 1
            FROM INFORMATION_SCHEMA.COLUMNS
            WHERE TABLE_SCHEMA = DATABASE()
              AND TABLE_NAME = 'foo'
              AND COLUMN_NAME = 'bar' ))
    THEN
        ALTER TABLE `foo` ADD COLUMN `bar` varchar(32) NOT NULL;
    END IF;
END $$