Generate dynamic sql script from Metadata


I have a metadata table like below, I need to generate SQL table script from Metadata table.
Please advice how to generate the 'create table script' form the metadata table for each tables.

Metadata Table.
TableID TableName ColumnName DataType
101 Table1 Column1 VarChar(50)
101 Table1 Column2 VarChar(50)
101 Table1 Column3 VarChar(50)
102 Table2 Column1 VarChar(50)
102 Table2 Column2 VarChar(50)
103 Table3 Column1 VarChar(50)
103 Table3 Column2 VarChar(50)
103 Table3 Column3 VarChar(50)
103 Table3 Column4 VarChar(50)
150 Table150 Column1 VarChar(50)
150 Table150 Column2 VarChar(50)
150 Table150 Column3 VarChar(50)

Note : In the metadata table has around 150 tables information.