Question: As the title says, I want to remove the `/presta` from my URL.

I can access it now with `domain.com/presta` but if I change from `Preferences > SEO & URL > Base URL` as "/", I can't access the site and if I connect to admin panel it's without GUI, just text.

Seems a little bit confusing.

Thanks in advance, sorry for any newbie mistake I've been working on this the whole day and it's my first try on presta.

Answer: 
The problem is that your `Function1` and `Function2` (horrible names!) return `Unit`, and `getValue` is declared to return a `String`

A declaration of a function looks like `def functionName(args): ReturnType = { ... }`

Some parts of this can be omitted, and then defaults are assumed. 
In your case, you omitted the `ReturnType` declaration, and (more importantly) the `=` sign. When there is no `=` before the function body, the function will always return `Unit`. If you want it to return a `String`, you need to add an `=` before the body, and make sure that the last statement in the body is indeed a `String`.

Additionally, the default `case` clause does not return anything. This does not work, because, again, `getValue` is declared to return a `String`. You need to either throw an exception in that case, or think of a default value to return (empty string?) or else use `Options`, like the other answer suggests.
Function1 and Function2 should return strings. Also, you cannot use println, since the result of it is Unit, in this case, you can throw an exception:

```
  def getValue(x: Any):Unit = x match {
    case "Value1"=> function1(1)
    case "Value2"=> function2(2)
    case _ => throw new IllegalArgumentException("This is an invalid value")
  }

  def function1(v: Int): String = {
      // SOME STUF THAT RETURNS STRING
  }

  def function2(v: Int): String = {
     // SOME STUF THAT RETURNS STRING
  }

```