No, you cannot override a #define constant with variable at run-time. The reason is simple: #define statements are processed by the compiler -- at compile-time, i.e. long before your program runs. And the compiler inserts those values as constants in your program code.
But you can do the following:
#define LIM 5
void MyFunction ()
{
int x;
if (!scanf ("%d", &x) != 1)
x = LIM;
...
}