Inherited from Chagatai مثلا, from Arabic مَثَلًا (maṯalan), adverbial accusative of مَثَل (maṯal). By surface analysis, masal + -an.
masalan