How to create a table with multiple data type like char short int string in mysql?
Entity-Attribute-Value is the nightmare you are embarking on.  See the additional tag I added.  See a similar tag in stackoverflow.com; there is a lot more discussion there.

It is traditional to have another column in the Attribute table:  entity_id, attribute, value.  Your question applies to how to store value; that is only part of the nightmare.

In the cases of integers, simply make it BIGINT; that will hold the various sizes (with a little wasted space), and simplify your code some.