Here are what i tried so far :
The first one seems like he treated @myvariable as the actual string and not as a variable.
SELECT column_name FROM mytable WHERE username LIKE '%@myvariable%';
/ Affected rows: 0 Found rows: 0 Warnings: 0 Duration for 2 queries: 0.015 sec. /
Here's an error to the second one that I tried based on Misha's suggestion above.
SELECT column_name FROM admins WHERE name LIKE CONCAT('%', @myvariable, '%');
/ SQL Error (1267): Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation 'like' /
/ Affected rows: 0 Found rows: 0 Warnings: 0 Duration for 1 of 2 queries: 0.000 sec. /